package com.example.demo.ai.llm.controller;

import com.example.demo.ai.llm.service.LlmDiagService;
import com.jfinal.kit.Kv;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.noear.solon.annotation.*;

/**
 * @author airhead
 */
@Controller
@Mapping("/llm")
@Api("聊天")
public class LlmDiagController {
  @Inject private LlmDiagService service;

  @ApiOperation("diag")
  @Post
  @Mapping("diag")
  public Kv diag(String prompt) {
    return service.diag(prompt);
  }
}
